// Last Update:2014-08-08 00:12:58
/**
 * @file udp_server.h
 * @brief 
 * @author zealoussnow@163.com
 * @version 0.1.00
 * @date 2014-08-07
 */

#ifndef UDP_SERVER_H
#define UDP_SERVER_H

#include <stdint.h>
#include <arpa/inet.h>

class UdpServer
{
public:
    UdpServer();
    ~UdpServer();
    bool Init(uint16_t port);

    uint32_t Recv(void *buf, uint32_t size, in6_addr *clientIp, uint16_t *clientPort);
    bool Send(const void *buf, uint32_t size, uint32_t clientIp, uint16_t clientPort);

private:
    int32_t m_socket;
};

#endif  /*UDP_SERVER_H*/
